package com.xyzwps.orm.ktorm.repository

import com.xyzwps.orm.repository.TablesRepository
import me.liuwj.ktorm.database.Database
import me.liuwj.ktorm.database.use

class KtormTablesRepository(private val db: Database): TablesRepository {
    override fun cleanAllTables() {
        db.useConnection { conn ->
            conn.prepareStatement("delete from tag").use { statement -> statement.execute() }
            conn.prepareStatement("delete from user").use { statement -> statement.execute() }
        }
    }
}
